<template>
  <div>
    <Category :disabled="isShow !== 'AttrList'"></Category>
    <AttrList
      v-if="isShow === 'AttrList'"
      @updateIsShow="updateIsShow"
    ></AttrList>
    <AddOrUpdateAttr v-else @updateIsShow="updateIsShow"></AddOrUpdateAttr>
  </div>
</template>

<script>
import AttrList from "@/views/product/attr/components/attrList.vue";
import AddOrUpdateAttr from "@/views/product/attr/components/addOrUpdateAttr.vue";
export default {
  name: "Attr",
  data() {
    return {
      isShow: "AttrList",
    };
  },
  components: {
    AttrList,
    AddOrUpdateAttr,
  },
  methods: {
    updateIsShow(newVal) {
      this.isShow = newVal;
    },
  },
};
</script>

<style lang="scss" scoped></style>
